﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Register.IDAL;
using Register.Model;
using Register.DALFactory;
using Register.Command;

namespace Register.BLL
{
    public class EvaluationInfoBLL
    {
        /// <summary>
        /// FileName: EvaluationInfo.cs
        /// CLRVersion: 4.0.30319.269
        /// Author: WangKungLun
        /// Corporation: 
        /// Description: 
        /// DateTime: 2012/7/9 10:07:20
        /// </summary>
        private static String typeNameKey = "IEvaluationInfoDALKey";

        public static List<Model.EvaluationInfo> GetPagedEvaluationInfo(int size, int pageIndex, string where)
        {
            IEvaluationInfoDAL iEvaluationInfo = DALFactory<IEvaluationInfoDAL>.Create(typeNameKey);

            try
            {
                return iEvaluationInfo.GetPagedEvaluationInfo(size, pageIndex, where);
            }
            catch (Exception e)
            {
                LogRecordHelper.LogNote("ERROR", e.Message);
                throw e;
            }
        }
        public static int GetEvaluationInfoCount(string where)
        {
            IEvaluationInfoDAL iEvaluationInfo = DALFactory<IEvaluationInfoDAL>.Create(typeNameKey);

            try
            {
                return iEvaluationInfo.GetEvaluationInfoCount(where);
            }
            catch (Exception e)
            {
                LogRecordHelper.LogNote("ERROR", e.Message);
                throw e;
            }
        }

    }
}
